from langchain.chat_models import init_chat_model




api_key = "sk-629f3f032ce248e090f62edf4cace885"


model = init_chat_model(
    "qwen-turbo",
    model_provider="openai",
    api_key=api_key,  # 直接传顶层 api_key
    openai_api_base="https://dashscope.aliyuncs.com/compatible-mode/v1",
)